









			     DatAna  - An introduction

	     Preliminaries

	     This text is an introduction to use the program DatAna.

             DatAna is a  program for  the PSION Series  3a to  analyse
             data.

             DatAna reads data, which  are produced by the  application
             data (i. e.  DBF-files) and  generates as  result a  table
             (SPR-file).

             In the  easiest case  DatAna is  a transformation  program
             which transforms DBF-files to SPR-files.

             More over you  may select  records, omit  some fields  and
             define data types or value parts for single fields.

             You may  count data  records, or  cumulate numerical  data
             (average, sum, minimum, maximum).  There are one- or  two-
             dimensional conversions.

             The parameters of a conversion can be saved to repeat  the
             conversion after the DBF-file has been updated.

             To save, print or work on the results of a conversion  you
             may use  known  functions  for SPR-files  with  the  PSION
             program table.

	     How to use

	     1. Start the program DatAna

                - by choosing  a  conversion  file  under  the  program
                  symbol and pressing Enter or

                - by creating a new conversion file with PSION-n.

             The conversion files are stored  in a directory \D2S\  and
             have the  ending    .D2S.  In a  conversion  we  save  all
             parameters of a conversion:

                - the input file, a DBF-file,

                - the output file, a SPR-file, and

                - the conversion parameters  like the conversion  type,
                  data types, record filter, screen preferences etc.

             2. Now choose the DBF- and the SPR-file names.

             3. With the menu you may adjust the conversion parameters.
             By default you work with  a simple conversion from a  DBF-
             to a SPR-file.





                                       - 2 -



             4. The desired conversion will be shown in three windows:

                a) In the first  window there are  the conversion  type
                  and the file names.

                b) A record filter for the selection of some records is
                  shown in  the second  window.  If the  record  filter
                  itself should not be printed  to the output file,  it
                  will be surrounded by brackets.

                c) The  third  window  shows   the  structure  of   the
                  resulting spread  sheet i.  e.  the labels  and  data
                  types. There are no data! This windows just shows how
                  the  resultting  SPR-file  will  be  structured.  The
                  analysis of the DBF-file will be only be generated to
                  the SPR-file.

             The windows may be made visible or invisible with the menu
             "Special:Preferences" (PSION-q). The numbers of  character
             per cell in  the structure  window may  be changed.  These
             preferences have no influence on the resulting SPR-file!

             5. Start  the  conversion  with  the  menu  "Actions:Start
             conversion" (PSION-m).

             6. View at the result by using the menu "Actions:View SPR-
             file" (PSION-p).

             7. Leave the  SPR-file by pressing  PSION-x and return  to
             DatAna.

	     Conversion Types

	     1. Conversion type list - the simple transformation

             In the easiest case all records are just transformed  from
             the DBF- to the SPR-file.

             2. Conversion type report - the one-dimensional analysis

             You need a key and a value field for a report. During  the
             conversion all keys, i. e. all contents of the choosen key
             field, are determined.

             In the easiest  case the  number of  occurencies are  just
             counted; here you have to use the value "#count". You  may
             choose a numerical field as value; then you need the  type
             of cumulation like average, sum, minimum or maximum.  With
             this conversion for every key  the values in the  DBF-file
             are cumulated according to the cumulation type.

             3. Conversion type table - the two-dimensional analysis

             With a  table all  records of  the DBF-file  are  analysed
             according to TWO keys. For  every occurence of a key  pair
             there will be





                                       - 3 -



                - the count of key pairs

                - or the cumulation of the choosen type (see conversion
                  type table).

	     Example file DATANA.DBF

	     There are some example data. In the following some  sample
             conversions with DatAna are descriped.

             Every record of DATANA.DBF describes a person; given is

                - name,

                - department,

                - experience,

                - age,

                - salary and

                - location.

             The file DATANA.DBF contents 13 records.

	     Questions

	     The following conversions are descriped:

                1. conversion of DATANA.DBF into a SPR-file

                2. conversion with data types and field parts

                3. How many persons with medium or high experience  are
                  available in which location?

                4. How old in the average are the persons specified for
                  their department and their experience?

                5. Which salaries are paid  in maximum - specified  for
                  department and age group?

	     Tutor1 - conversion of DATANA.DBF into a SPR-file

	     After the	start of  DatAna from  the system  screen  with
             PSION-n or within  DatAna with the  menu "File: New  File"
             specify  the  conversion  file  name,  the  DBF-file  name
             DATANA.DBF (as input or source) and the SPR-file name TEST
             (as output or result file).

             The conversion  is started  with the  menu  "Actions:Start
             conversion" (PSION-m).

             The result file  may be  viewed with  "Actions: Show  SPR-
             file" (Psion-p).





                                       - 4 -



             To leave the SPR-file press PSION-x and return to DatAna.

             This conversion is available as TUTOR1.D2S.

             The generated spread sheet should look like:

             
             Ŀ
             Name:   DepartmeExperienAge:    Salary:
             LocationFld7    Fld8    
             Anton   D1      low     40      5500    A-town  
                     
             Berta   D2      medium  38      6500    C-town  
                     
             Caesar  D3      medium  44      6100    A-town  
                     
             Dora    D3      low     38      5300    A-town  
                     
             Emil    D3      low     23      4900    A-town  
                     
             Fritz   D2      medium  29      5900    B-town  
                     
             Gertrud D2      low     29      4700    A-town  
                     
             HeinrichD2      high    39      7678    C-town  
                     
             Ida     D2      high    44      7700    B-town  
                     
             Julia   D1      medium  38      6900    A-town  
                     
             Karl    D1      medium  35      6700    B-town  
                     
             Ludwig  D3      high    61      7400    C-town  
                     
             Norbert D1      high    39      7210    C-town  
                     
             
             

             

	     Tutor2 - conversion with data types and field parts

	     For this conversion there should only be taken the fields:
             name, the first letter of experience, age and salary.  The
             last two fields should be numerical (integer and float).

             You have to define the right data types with  "Layout:data
             types" (PSION-t):

                  Name:     String
                  Department:    Omit
                  Experience:    String
                  Age:      Integer
                  Salary:   Float
                  Location: Omit





                                       - 5 -



                  (omit all following fields)

             With "Layout:field parts"  (PSION-f) you  can define  that
             you only want the first  letter of experience. Press n  to
             get the specification for  experience and choose only  the
             first letter:

                  Experience:- FROM        1

                  Experience:-LENGTH  1

             With "Layout:Conversion  type"  (PSION-a) you  may  define
             that the resulting  data may  be put as  columns into  the
             SPR-file.

             The eleven five columns of the result should look like:

             
             
             Name:   Anton   Berta   Caesar  Dora    Emil
             Fritz   Gertrud HeinrichIda     Julia
             Experienlow     medium  medium  low     low    
             medium  low     high    high    mediu
             Age:          40      38      44      38      23
             29      29      39      44
             Salary:     5500    6500    6100    5300    4900
             5900    4700    7678    7700    6
             
             

	     Tutor3 - How many persons with medium or high experience
	     are available in which location?

	     With the  menu "Layout:Conversion  type" (PSION-a)  choose
             the conversion type "report".

             As key for the counting you need the location and as value
             define #count.

             We only  want to  count persons  who have  medium or  high
             experience.

             Define with  "Layout:Record  filter"  (PSION-r)  a  record
             filter. Formulate the first comparison:

                  label name:              Experience
                  comparison operator:          =
                  comparison operand:      medium

             After pressing Enter press the arrow down key to bring the
             cursor into a blank line and define:

                  conjunction:             or
                  label name:              Experience
                  comparison operator:          =
                  comparison operand:      high





                                       - 6 -



             Leave the dialog with ESC. You defined a record filter:

                  Experience: = "medium"
                  or Experience:="high"

             The record  filter  may  printed into  the  SPR-file  with
             "Layout:Conversion type" (PSION-a) into the SPR-file.

             The result should be:

             Ŀ
              Experience: =...
                             
             LocationCount   
             C-town         4
             A-town         2
             B-town         3
             

	     Tutor4 - How old in the average are the persons specified
	     for their department and their experience?

	     First, define the data type  of age as integer because  we
             shall cumulate over age.

             For this  kind of  conversion  we need  a  two-dimensional
             conversion i. e. a table as conversion type.

             The keys are department and  experience. The value is  the
             field age together with the cumulation type average.

             The SPR-file shows:

             Ŀ
             avg(Age:Department:                      
             Experience:      low     medium  high    
                     D1            40    36,5      39
                     D2            29    33,5    41,5
                     D3          30,5      44      61
             

	     Tutor5 - Which salaries are paid in maximum - specified
	     for department and age group?

	     The data type of salary should be decimal.

             For the field age you need a field part

                  Age:-FROM      1
                  Age:-LENGTH    1

             By this setting we consider only the century of age of the
             persons.





                                       - 7 -



             The conversion  in this  case  is a  table with  the  keys
             department  and  age.  Choose  salary  as  value  and  the
             cumulation type maximum which results in

             Ŀ
             max(SalaDepartment:                              
             Age:            4       3       2       6       
                     D1          5500    7210       0       0
                     D2          7700    7678    5900       0
                     D3          6100    5300    4900    7400
             

             

             
